<template>
  <ContainerGroup>
    <Container style="margin-bottom: 10px">
      <FilterForm
        ref="filterForm"
        :elements="filterElements"
        @submit="resetForm"
        @reset="searchSubmit"
      />
    </Container>
    <Container height="fill" :scroll-y="true" display="flexY">
      <OperationContainer
        style="margin-bottom: 10px; display: flex; align-items: center"
      >

        <div><Button icon="add" @click="createNewData">保存</Button></div>
        <div><Button icon="add" @click="createNewData">打印</Button></div>
        <div><Button icon="add" @click="createNewData">导出数据</Button></div>
      </OperationContainer>
      <el-table
        v-loading="loading"
        :data="tableData"
        border
        :header-cell-style="{ background: '#fafafa', borderColor: '#e7ecf8' }"
        header-row-class-name="ck-table-header"
        row-class-name="ck-table-row"
        size="small"
      >
        <el-table-column align="center" label="基本信息">
          <el-table-column label="序号" align="center" />
          <el-table-column label="科室代码" align="center" />
          <el-table-column label="科室名称" align="center" />
        </el-table-column>
        <el-table-column label="总成本" align="center" />
        <el-table-column label="直接成本" align="center" />

        <el-table-column label="间接成本" align="center">
          <el-table-column label="医技分摊" align="center">
            <el-table-column label="金额" />
            <el-table-column label="比例" />
          </el-table-column>
          <el-table-column label="医辅分摊" align="center">
            <el-table-column label="金额" />
            <el-table-column label="比例" /></el-table-column>
          <el-table-column label="管理分摊" align="center">
            <el-table-column label="金额" />
            <el-table-column label="比例" /></el-table-column>
          <el-table-column label="间接成本总计" align="center">
            <el-table-column label="金额" />
            <el-table-column label="比例" /></el-table-column>
        </el-table-column>
      </el-table>
      <div class="pagenation-box">
        <el-pagination
          :current-page.sync="currentPage"
          :page-sizes="[10, 20, 30, 40]"
          :page-size="pageSize"
          layout="total, sizes, prev, pager, next, jumper"
          :total="total"
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
        />
      </div>
    </Container>
  </ContainerGroup>
</template>

<script>
export default {
  name: 'Wage', // 科室-工资对应
  components: {},
  data() {
    return {
      filterElements: [
        {
          key: 'sexy',
          type: 'date-picker',
          label: '日期选择',
          value: '',
          width: 210
        }
      ],
      total: 0,
      pageSize: 20,
      currentPage: 1,
      tableData: [
        {
          code: '01',
          name: '工资和津贴',
          operateTime: '2021-09-23 09:01:02',
          isUse: '1'
        },
        {
          code: '02',
          name: '绩效工资',
          operateTime: '2021-09-23 09:01:02',
          isUse: '1'
        },
        {
          code: '03',
          name: '社会保障费',
          operateTime: '2021-09-23 09:01:02',
          isUse: '1'
        },
        {
          code: '04',
          name: '其他人员工资',
          operateTime: '2021-09-23 09:01:02',
          isUse: '0'
        },
        {
          code: '05',
          name: '办公费',
          operateTime: '2021-09-23 09:01:02',
          isUse: '1'
        },
        {
          code: '06',
          name: '业务费',
          operateTime: '2021-09-23 09:01:02',
          isUse: '1'
        }
      ],
      tableLoading: false
    }
  },
  created() {},
  mounted() {},
  methods: {
    resetForm() {},
    searchSubmit() {},
    createNewData() {},
    // 分页
    handleSizeChange(val) {
      this.pageSize = val
      this._getData()
    },
    handleCurrentChange(val) {
      this.pageNum = val
      this._getData()
    }
  }
}
</script>

<style lang="less" scoped>
.el-table--mini,
.el-table--small,
.el-table__expand-icon {
  font-size: 14px !important;
}

.ck-table-header {
  th {
    background: #fafafa !important;
    height: 48px;
    color: #555555 !important;
  }
}
.pagenation-box {
  display: flex;
  padding-top: 2px;
  justify-content: flex-end;
}
</style>
